<template>
  <div class="login">
    <!-- 测试全局组件 -->
    <!-- <div>
      <h2 @click="addCount(50)">testcount -- {{testcount}}</h2>
      <GlbCptEX/>
    </div> -->
    <!-- <h2>Login -- 登录</h2> -->

    <!-- 头部-------------------------------------------- -->
    <my-header title="登录" :back="true">
      <!-- 具名插槽 要写#加名 -->
      <template #left>
        <div class="back">
          <van-icon
            name="revoke"
            size="18"
            color="#ff5f16"
            @click="gotoback"
          ></van-icon>
        </div>
      </template>
    </my-header>

    <!-- 登录框------------------------------------------------ -->
    <div class="login-box">
      <van-tabs v-model="active" color="#ff5f16" title-active-color="#ff5f16">
        <van-tab title="密码登录" name="password">
          <LoginByPwd />
        </van-tab>
        <van-tab title="验证码登录" name="code">
          <LoginByCode />
        </van-tab>
      </van-tabs>
    </div>
  </div>
</template>


<script>
import LoginByCode from "./LoginByCode";
import LoginByPwd from "./LoginByPwd";

export default {
  data() {
    return {
      // 默认激活的登录方式
      active: "password",
    };
  },
  methods: {},
  mounted() {},
  components: {
    LoginByCode,
    LoginByPwd,
  },
};
</script>

<style lang="scss" scoped>
.login {
  background: #f4f4f4;
  .login-box {
    width: 100%;
    padding: 15px !important;
  }
}
</style>